﻿''' <summary>
''' Takes an integer and return False if the integer is 0 or null, otherwise it returns true
''' </summary>
''' <remarks></remarks>
Public Class ZeroToFalseConverter
    Implements IValueConverter

    Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As Globalization.CultureInfo) As Object Implements IValueConverter.Convert
        If value IsNot Nothing Then
            If CInt(value) = 0 Then
                Return False
            Else
                Return True
            End If
        End If
        Return False
    End Function

    Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As Globalization.CultureInfo) As Object Implements IValueConverter.ConvertBack
        Throw New NotImplementedException
    End Function
End Class
